declare let eManager;
const { ccclass, property } = cc._decorator;
//8-1 头发
@ccclass
export default class TouFa extends cc.Component {
    @property
    stepName = "";
    //默认头发
    @property(cc.Node)
    defaultHair: cc.Node = null;
    //头发 后
    @property(cc.Node)
    hairNodeB: cc.Node = null;
    //头发 前
    @property(cc.Node)
    hairNodeF: cc.Node = null;

    @property(cc.Animation)
    rootAni: cc.Animation = null;

    start() {
        this.rootAni.play("end_pai");
    };

    initData() {
        eManager.emit("HZ_SHOW_SELECT_LIST", {
            step: 8,
            point: 1,
            callback: () => {
                this.defaultHair.active = false;
                this.hairNodeB.active = true;
                this.hairNodeF.active = true;
                eManager.emit("DONE_POINT", 1);
                eManager.emit("MINI_DONE_POINT", 1);
                eManager.emit("HZ_MAKE_DOT", {
                    makeup_close:8,
                    makeup_step:this.stepName
                });
            }
        });
        this.defaultHair.active = false;
        this.hairNodeB.active = true;
        this.hairNodeF.active = true;
        eManager.emit("DONE_POINT", 1);
        eManager.emit("MINI_DONE_POINT", 1);
        eManager.emit("HZ_MAKE_DOT", {
            makeup_close:8,
            makeup_step:this.stepName
        });
        eManager.emit("REFRESH_STEP_NAME", this.stepName);
        eManager.emit("HZ_REFRESH_ICON_TIPS", null);
    };

}
